package com.jinkaimen.goodcash.ui.holder;

import android.widget.TextView;

import com.ht.baselibs.ui.base.BaseViewHolder;
import com.ht.baselibs.utils.DateUtils;
import com.jinkaimen.goodcash.R;
import com.jinkaimen.goodcash.bean.ReportShoperManagerItemBean;

public class WaitPassViewHolder extends BaseViewHolder<ReportShoperManagerItemBean> {
    private int mType;
    private TextView mNameView;
    private TextView mDateView;

    public WaitPassViewHolder(int type) {
        super(R.layout.list_wait_pass_shoper_manager_item);
        this.mType = type;
    }

    @Override
    protected void initView() {
        mNameView = findViewById(R.id.tv_list_shop_manager_item_shop_name);
        mDateView = findViewById(R.id.tv_list_shop_manager_item_shop_date);
    }

    @Override
    protected void refreshView(final ReportShoperManagerItemBean itemBean) {
        mNameView.setText(itemBean.shortName);
        switch (mType){
            case 0:
                mDateView.setText(DateUtils.formatDate(itemBean.updateTime)+"提交");
                break;
            case 1:
                mDateView.setText(itemBean.checkErrorInfo);
                break;
            case 2:
                mDateView.setText("去完善信息");
                break;
        }
    }
}
